package com.vincent.jvmtest.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author vincent
 * @DATE 2018/11/19
 * @Description
 */
@Configuration
@EnableConfigurationProperties(TestProperties.class)
public class TestConfig {
    public TestConfig() {
    }

    @Bean
    public Hepler hepler(TestProperties properties){
        Hepler hepler = new Hepler();
        hepler.setConfig(properties);
        //hepler.init();
        return hepler;
    }
}
